#include <stdio.h>

int searchInsert(int* nums, int numsSize, int target) 
{
    if(nums[numsSize - 1] < target)
    {
        return numsSize;
    }
    for(int i = 0;i < numsSize;i++)
    {
        if(nums[i] >= target)
            return i;
    }
}

int main()
{
    int nums[] = {1,3,4,5};
    int numsSize = sizeof(nums)/sizeof(nums[0]);
    int target = 6;
    int n = searchInsert(nums,numsSize, target);
    printf("%d\n",n);
    return 0;
}